<script setup>
defineProps({
  member: {
    type: Object,
    required: true
  }
})
</script>

<template>
  <div class="team-member-card">
    <div class="member-image">
      <img :src="member.avatar" :alt="member.name">
    </div>
    <div class="member-info">
      <h3 class="member-name" v-text="member.name"></h3>
      <p class="member-position" v-text="member.position"></p>
      <p class="member-bio" v-text="member.bio"></p>
      <div class="social-links" v-if="member.socialLinks">
        <a 
          v-for="(link, platform) in member.socialLinks" 
          :key="platform"
          :href="link" 
          target="_blank"
          class="social-link"
          v-text="platform"
        >
        </a>
      </div>
    </div>
  </div>
</template>

<style scoped>
.team-member-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.team-member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(102, 126, 234, 0.2);
}

.member-image {
  height: 250px;
  overflow: hidden;
}

.member-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-member-card:hover .member-image img {
  transform: scale(1.05);
}

.member-info {
  padding: 1.8rem;
  text-align: center;
}

.member-name {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 700;
}

.member-position {
  color: #667eea;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.member-bio {
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-link {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
  .team-member-card {
    border-radius: 15px;
  }
  
  .member-image {
    height: 200px;
  }
  
  .member-info {
    padding: 1.5rem;
  }
  
  .member-name {
    font-size: 1.4rem;
  }
  
  .social-link {
    width: 35px;
    height: 35px;
    line-height: 35px;
    font-size: 0.9rem;
  }
}
</style>